package com.example.bob.uicontrols;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.GridView;

import java.lang.reflect.Array;

/**
 * Created by Bob on 2016/3/12.
 */
public class AtyUsingGridView extends Activity{

    private ArrayAdapter<String> adapter;
    private GridView gridView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.aty_using_gridview);

        adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1);

        gridView = (GridView) findViewById(R.id.gridView);
        gridView.setAdapter(adapter);

        for (int i = 0 ; i < 60 ; i++){
            adapter.add("Bob"+i);
        }
    }
}
